package org.example.controller;

import org.example.utils.BusinessException;
import org.example.utils.Code;
import org.example.utils.Result;
import org.example.model.Sysrole;
import org.example.service.ResourcesService;
import org.example.utils.SystemException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;


//定义表现层控制器bean
@Controller
@ResponseBody
@RequestMapping("/books")
public class UserController {

    @Autowired
    private ResourcesService resourcesService;

    @GetMapping
    public Result save() {
        System.out.println("我是配置文件ssm");
        List<Sysrole> list = resourcesService.save("");
        return Result.success("查询成功", 200, list);
    }


}
